[#macro pager pager url parameterMap = {} maxShowPageCount = 4]
    [#if pager.list?has_content && pager.pageCount > 1]
    <script type="text/javascript">
        var extraParam = {};
        function page_search_go2(num){
            if(!num){
                num = 1;
            }
            if(extraParam.page_search_go){
                extraParam.page_search_go("${pager.pageNumber}", num);
                return;
            }
            num = isNaN(num) ? 0 : num;
            $("#pageNumber").val(num);

            $("#page_search_form").submit();
        }
    </script>
    <style>
        .rate-page .rate-paginator .currentPage{
            background-color:#ddd;
        }
    </style>
    <div class="rate-page">
        <div class="rate-paginator">
            <form id="page_search_form" action="${url}">
                <input type="hidden" name="pageNumber" id="pageNumber" value="1"/>
                [#list parameterMap?keys as key]
                    [#if parameterMap[key]??]
                        <input type="hidden" name="${key}" value="${(parameterMap[key])!''}"/>
                    [/#if]
                [/#list]
            </form>

            [#if pager.pageNumber > 1]
                <a class="rate-page-prev" href="javascript:page_search_go2(${pager.pageNumber-1});">&lt;&lt;上一页</a>
            [/#if]

            <a href="javascript:page_search_go2(1);" [#if pager.pageNumber = 1]class='currentPage'[/#if]>1</a>

            [#assign startCount = pager.pageNumber - maxShowPageCount/]
            [#if startCount <= 0]
                [#assign startCount = 1 /]
            [/#if]
            [#assign endCount = pager.pageNumber + maxShowPageCount/]
            [#if endCount > pager.pageCount]
                [#assign endCount = pager.pageCount /]
            [/#if]
            [#if startCount > 2]
                <span class="rate-page-break">...</span>
            [/#if]
            [#list startCount..endCount as i]
                [#if i != 1 && i != pager.pageCount]
                    <a href="javascript:page_search_go2(${i});" [#if pager.pageNumber = i]class='currentPage'[/#if]>${i}</a>
                [/#if]
            [/#list]
            [#if endCount < pager.pageCount - 1]
                <span class="rate-page-break">...</span>
            [/#if]
            [#if pager.pageCount != 1]
                <a href="javascript:page_search_go2(${pager.pageCount});" [#if pager.pageNumber = pager.pageCount]class='currentPage'[/#if]>${pager.pageCount}</a>
            [/#if]
            [#if pager.pageNumber < pager.pageCount]
                <a href="javascript:page_search_go2(${pager.pageNumber+1});" class="rate-page-next">下一页&gt;&gt;</a>
            [/#if]
        </div>
    </div>
    [/#if]
[/#macro]